import {
    get,
    post
} from "./http"

// =====菜单管理======
//菜单添加
export let reqmenuadd = (params) => post("/api/menuadd", params)
    //菜单列表
export let reqmenulist = (params) => get("/api/menulist", params)
    //菜单详情
export let reqmenuinfo = (params) => get("/api/menuinfo", params)
    //菜单修改
export let reqmenuedit = (params) => post("/api/menuedit", params)
    //菜单删除
export let reqmenudelete = (params) => post("/api/menudelete", params)

//=======角色管理=======
//角色添加
export let reqroleadd = (params) => post("/api/roleadd", params)
    //角色列表
export let reqrolelist = (params) => get("/api/rolelist", params)
    //角色详情
export let reqroleinfo = (params) => get("/api/roleinfo", params)
    //角色修改
export let reqroleedit = (params) => post("/api/roleedit", params)
    //角色删除
export let reqroledelete = (params) => post("/api/roledelete", params)


//=======管理员管理=======
//管理员添加
export let requseradd = (params) => post("/api/useradd", params)
    //管理员列表
export let requserlist = (params) => get("/api/userlist", params)
    //管理员详情
export let requserinfo = (params) => get("/api/userinfo", params)
    //管理员修改
export let requseredit = (params) => post("/api/useredit", params)
    //管理员删除
export let requserdelete = (params) => post("/api/userdelete", params)
    //获取总数
export let requsercount = (params) => get("/api/usercount", params)
    //管理员登录
export let requserlogin = (params) => post("/api/userlogin", params)


//=======会员管理=======
//会员列表
export let reqmemberlist = (params) => get("/api/memberlist", params)
    //会员详情
export let reqmemberinfo = (params) => get("/api/memberinfo", params)
    //会员修改
export let reqmemberedit = (params) => post("/api/memberedit", params)


//=======商品分类管理=======
//商品分类添加
export let reqcateadd = (params) => post("/api/cateadd", params, true)
    //商品分类列表
export let reqcatelist = (params) => get("/api/catelist", params)
    //商品分类详情
export let reqcateinfo = (params) => get("/api/cateinfo", params)
    //商品分类修改
export let reqcateedit = (params) => post("/api/cateedit", params, true)
    //商品分类删除
export let reqcatedelete = (params) => post("/api/catedelete", params)



//=======规格管理=======
//规格添加
export let reqspecsadd = (params) => post("/api/specsadd", params)
    //规格列表
export let reqspecslist = (params) => get("/api/specslist", params)
    //规格详情
export let reqspecsinfo = (params) => get("/api/specsinfo", params)
    //规格修改
export let reqspecsedit = (params) => post("/api/specsedit", params)
    //规格删除
export let reqspecsdelete = (params) => post("/api/specsdelete", params)
    //获取总数
export let reqspecscount = (params) => get("/api/specscount", params)



// =====商品管理======                                      
//商品添加
export let reqgoodsadd = (params) => post("/api/goodsadd", params, true)
    //商品列表
export let reqgoodslist = (params) => get("/api/goodslist", params)
    //商品详情
export let reqgoodsinfo = (params) => get("/api/goodsinfo", params)
    //商品修改
export let reqgoodsedit = (params) => post("/api/goodsedit", params, true)
    //商品删除
export let reqgoodsdelete = (params) => post("/api/goodsdelete", params)
    //商品总数
export let reqgoodscount = () => get("/api/goodscount")


//=======轮播图管理=======
//轮播图添加
export let reqbanneradd = (params) => post("/api/banneradd", params, true)
    //轮播图列表
export let reqbannerlist = (params) => get("/api/bannerlist", params)
    //轮播图详情
export let reqbannerinfo = (params) => get("/api/bannerinfo", params)
    //轮播图修改
export let reqbanneredit = (params) => post("/api/banneredit", params, true)
    //轮播图删除
export let reqbannerdelete = (params) => post("/api/bannerdelete", params)


//=======秒杀管理=======
//秒杀添加
export let reqseckadd = (params) => post("/api/seckadd", params)
    //秒杀列表
export let reqsecklist = (params) => get("/api/secklist", params)
    //秒杀详情
export let reqseckinfo = (params) => get("/api/seckinfo", params)
    //秒杀修改
export let reqseckedit = (params) => post("/api/seckedit", params)
    //秒杀删除
export let reqseckdelete = (params) => post("/api/seckdelete", params)